<?php

namespace app\index\model;
use think\Db;
use think\Model;

class AboutModel extends Model
{
    public function lists()
    {
        $data = Db::table('shoporder')
                    ->select();

        for($a=0; $a<count($data); $a++)
        {
            if(empty($data[$a]['pictrue'])){
                $data[$a]['icon'] = '/static/admin/img/default.jpg';
            }else{
                $data[$a]['icon'] = '/static/admin/img/'.$data[$a]['pictrue'];
            }
        }

        // var_dump($data);die;
        return $data;
    }

}
















